package com.exchange.common.model.dto;

import com.fasterxml.jackson.annotation.JsonFormat;

import cn.hutool.json.JSONUtil;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * -说明： 交易记录实体类
 * 
 */
public class Trade implements Serializable {

	private static final long serialVersionUID = 10001L;

	//@ApiModelProperty(name = "id", value = "ID")
	private Long id;

	//@ApiModelProperty(name = "uid", value = "用户ID")
	private Long uid;

	//@ApiModelProperty(name = "oid", value = "订单ID")
	private Long oid;

	//@ApiModelProperty(name = "isBuy", value = "是买交易")
	private Boolean isBuy;

	//@ApiModelProperty(name = "number", value = "交易数量")
	private BigDecimal number;

	//@ApiModelProperty(name = "price", value = "实际成交价")
	private BigDecimal price;

	//@ApiModelProperty(name = "totalPrice", value = "成交总价")
	private BigDecimal totalPrice;

	//@ApiModelProperty(name = "coinTeam", value = "交易队")
	private String coinTeam;

	//@ApiModelProperty(name = "poundage", value = "手续费")
	private BigDecimal poundage;

//	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	//@ApiModelProperty(name = "createTime", value = "成交时间")
	private Date createTime;

	//@ApiModelProperty(name = "dealWay" , value = "成交方式（taker市价，maker限价）")
    private String dealWay;
	
	//@ApiModelProperty(name = "remark", value = "备用字段<用法①委托均价>")
	private String remark;

	
	public Long getId() {
		return id;
	}


	public Trade setId(Long id) {
		this.id = id;
		return this;
	}


	public Long getUid() {
		return uid;
	}


	public Trade setUid(Long uid) {
		this.uid = uid;
		return this;
	}


	public Long getOid() {
		return oid;
	}


	public Trade setOid(Long oid) {
		this.oid = oid;
		return this;
	}


	public Boolean getIsBuy() {
		return isBuy;
	}


	public Trade setIsBuy(Boolean isBuy) {
		this.isBuy = isBuy;
		return this;
	}


	public BigDecimal getNumber() {
		return number;
	}


	public Trade setNumber(BigDecimal number) {
		this.number = number;
		return this;
	}


	public BigDecimal getPrice() {
		return price;
	}


	public Trade setPrice(BigDecimal price) {
		this.price = price;
		return this;
	}


	public BigDecimal getTotalPrice() {
		return totalPrice;
	}


	public Trade setTotalPrice(BigDecimal totalPrice) {
		this.totalPrice = totalPrice;
		return this;
	}


	public String getCoinTeam() {
		return coinTeam;
	}


	public Trade setCoinTeam(String coinTeam) {
		this.coinTeam = coinTeam;
		return this;
	}


	public BigDecimal getPoundage() {
		return poundage;
	}


	public Trade setPoundage(BigDecimal poundage) {
		this.poundage = poundage;
		return this;
	}


	public Date getCreateTime() {
		return createTime;
	}


	public Trade setCreateTime(Date createTime) {
		this.createTime = createTime;
		return this;
	}


	public String getDealWay() {
		return dealWay;
	}


	public Trade setDealWay(String dealWay) {
		this.dealWay = dealWay;
		return this;
	}


	public String getRemark() {
		return remark;
	}


	public Trade setRemark(String remark) {
		this.remark = remark;
		return this;
	}


	public String toJsonString() {
		return JSONUtil.toJsonStr(this);
	}
}
